﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataFrameworkAccess.Entity;

namespace Xinkui.Entity.AutoGenerator {
    public partial class MessageSendBox_Entity {

        [DataMapping("LastName", System.Data.DbType.String)]
        public string LastName { get; set; }


        [DataMapping("FirstName", System.Data.DbType.String)]
        public string FirstName { get; set; }



        public string SendTo {
            get {
                if (!string.IsNullOrEmpty(LastName) && !string.IsNullOrEmpty(FirstName))
                    return string.Format("{0}, {1}", LastName, FirstName);
                else if (!string.IsNullOrEmpty(LastName) || !string.IsNullOrEmpty(FirstName)) {
                    return string.IsNullOrEmpty(LastName) ? FirstName : LastName;
                }
                else {
                    return " ";
                }
            }
        }

    }
}
